Optimal. Leaf size=240 \[ \frac {2 b p q (h i-g j) \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h^2}+\frac {(h i-g j) \log \left (\frac {f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{h^2}+\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f h}-\frac {2 a b j p q x}{h}-\frac {2 b^2 j p q (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h}-\frac {2 b^2 p^2 q^2 (h i-g j) \text {Li}_3\left (-\frac {h (e+f x)}{f g-e h}\right )}{h^2}+\frac {2 b^2 j p^2 q^2 x}{h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.65, antiderivative size = 240, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 9, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2418, 2389, 2296, 2295, 2396, 2433, 2374, 6589, 2445} \[ \frac {2 b p q (h i-g j) \text {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h^2}-\frac {2 b^2 p^2 q^2 (h i-g j) \text {PolyLog}\left (3,-\frac {h (e+f x)}{f g-e h}\right )}{h^2}+\frac {(h i-g j) \log \left (\frac {f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{h^2}+\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f h}-\frac {2 a b j p q x}{h}-\frac {2 b^2 j p q (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h}+\frac {2 b^2 j p^2 q^2 x}{h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2295
Rule 2296
Rule 2374
Rule 2389
Rule 2396
Rule 2418
Rule 2433
Rule 2445
Rule 6589
Rubi steps
\begin {align*} \int \frac {(531+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx &=\operatorname {Subst}\left (\int \frac {(531+j x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{g+h x} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {j \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{h}+\frac {(531 h-g j) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{h (g+h x)}\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\operatorname {Subst}\left (\frac {j \int \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2 \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname {Subst}\left (\frac {(531 h-g j) \int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{g+h x} \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(531 h-g j) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h^2}+\operatorname {Subst}\left (\frac {j \operatorname {Subst}\left (\int \left (a+b \log \left (c d^q x^{p q}\right )\right )^2 \, dx,x,e+f x\right )}{f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname {Subst}\left (\frac {(2 b f (531 h-g j) p q) \int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{e+f x} \, dx}{h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f h}+\frac {(531 h-g j) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h^2}-\operatorname {Subst}\left (\frac {(2 b j p q) \operatorname {Subst}\left (\int \left (a+b \log \left (c d^q x^{p q}\right )\right ) \, dx,x,e+f x\right )}{f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname {Subst}\left (\frac {(2 b (531 h-g j) p q) \operatorname {Subst}\left (\int \frac {\left (a+b \log \left (c d^q x^{p q}\right )\right ) \log \left (\frac {f \left (\frac {f g-e h}{f}+\frac {h x}{f}\right )}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {2 a b j p q x}{h}+\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f h}+\frac {(531 h-g j) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h^2}+\frac {2 b (531 h-g j) p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{h^2}-\operatorname {Subst}\left (\frac {\left (2 b^2 j p q\right ) \operatorname {Subst}\left (\int \log \left (c d^q x^{p q}\right ) \, dx,x,e+f x\right )}{f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname {Subst}\left (\frac {\left (2 b^2 (531 h-g j) p^2 q^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {2 a b j p q x}{h}+\frac {2 b^2 j p^2 q^2 x}{h}-\frac {2 b^2 j p q (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h}+\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f h}+\frac {(531 h-g j) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h^2}+\frac {2 b (531 h-g j) p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{h^2}-\frac {2 b^2 (531 h-g j) p^2 q^2 \text {Li}_3\left (-\frac {h (e+f x)}{f g-e h}\right )}{h^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.39, size = 852, normalized size = 3.55 \[ \frac {f h j x a^2+f h i \log (g+h x) a^2-f g j \log (g+h x) a^2-2 b e h j p q a-2 b f h j p q x a+2 b e h j p q \log (e+f x) a+2 b f h j x \log \left (c \left (d (e+f x)^p\right )^q\right ) a-2 b f h i p q \log (e+f x) \log (g+h x) a+2 b f g j p q \log (e+f x) \log (g+h x) a+2 b f h i \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x) a-2 b f g j \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x) a+2 b f h i p q \log (e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right ) a-2 b f g j p q \log (e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right ) a-b^2 e h j p^2 q^2 \log ^2(e+f x)+b^2 f h j x \log ^2\left (c \left (d (e+f x)^p\right )^q\right )+2 b^2 f h j p^2 q^2 x-2 b^2 e h j p q \log \left (c \left (d (e+f x)^p\right )^q\right )-2 b^2 f h j p q x \log \left (c \left (d (e+f x)^p\right )^q\right )+2 b^2 e h j p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )+b^2 f h i p^2 q^2 \log ^2(e+f x) \log (g+h x)-b^2 f g j p^2 q^2 \log ^2(e+f x) \log (g+h x)+b^2 f h i \log ^2\left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)-b^2 f g j \log ^2\left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)-2 b^2 f h i p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)+2 b^2 f g j p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)-b^2 f h i p^2 q^2 \log ^2(e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+b^2 f g j p^2 q^2 \log ^2(e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+2 b^2 f h i p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )-2 b^2 f g j p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )+2 b f (h i-g j) p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \text {Li}_2\left (\frac {h (e+f x)}{e h-f g}\right )+2 b^2 f (g j-h i) p^2 q^2 \text {Li}_3\left (\frac {h (e+f x)}{e h-f g}\right )}{f h^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.45, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {a^{2} j x + a^{2} i + {\left (b^{2} j x + b^{2} i\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + 2 \, {\left (a b j x + a b i\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{h x + g}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (j x + i\right )} {\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{h x + g}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.37, size = 0, normalized size = 0.00 \[ \int \frac {\left (j x +i \right ) \left (b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )+a \right )^{2}}{h x +g}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} j {\left (\frac {x}{h} - \frac {g \log \left (h x + g\right )}{h^{2}}\right )} + \frac {a^{2} i \log \left (h x + g\right )}{h} + \int \frac {2 \, {\left (i q \log \relax (d) + i \log \relax (c)\right )} a b + {\left (i q^{2} \log \relax (d)^{2} + 2 \, i q \log \relax (c) \log \relax (d) + i \log \relax (c)^{2}\right )} b^{2} + {\left (b^{2} j x + b^{2} i\right )} \log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )^{2} + {\left (2 \, {\left (j q \log \relax (d) + j \log \relax (c)\right )} a b + {\left (j q^{2} \log \relax (d)^{2} + 2 \, j q \log \relax (c) \log \relax (d) + j \log \relax (c)^{2}\right )} b^{2}\right )} x + 2 \, {\left ({\left (i q \log \relax (d) + i \log \relax (c)\right )} b^{2} + a b i + {\left ({\left (j q \log \relax (d) + j \log \relax (c)\right )} b^{2} + a b j\right )} x\right )} \log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )}{h x + g}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\left (i+j\,x\right )\,{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2}{g+h\,x} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2} \left (i + j x\right )}{g + h x}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________